package game.view.scene
{
	import flash.display.Sprite;
	
	import game.managers.LayerManager;
	
	public class GameView extends Sprite
	{
		private static var _instance:GameView;
		
		public function GameView()
		{
			if(_instance == null){
				super();
				init();
			}else
				throw new Error("GameView is single instance.");
		}
		
		public static function getInstance():GameView
		{
			if(_instance == null)
				_instance = new GameView();
			return _instance;
		}
		
		private function init():void
		{
			mouseEnabled=false;
			
			/**场景层*/
			LayerManager.sceneLayer=new Sprite();
			LayerManager.sceneLayer.mouseEnabled=false;
			addChild(LayerManager.sceneLayer);
			
			/**ui层*/
			LayerManager.uiLayer = new Sprite();
			addChild(LayerManager.uiLayer);
			
			/**窗口层*/
			LayerManager.windowLayer = new Sprite();
			addChild(LayerManager.windowLayer);
		}
	}
}